<?php
use yii\widgets\ActiveForm;
?>
<link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="../static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="../static/css/admin.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.theme.default.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datatables/jquery.dataTables.css" type="text/css">
<link rel="stylesheet" type="text/css" href="../static/app/goods-keyword/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../static/app/goods-keyword/css/jquery.dropdown.css">
<style>
    .ul_tree_display{
        display: none;
    }
    .tr_tree_display{
        display: none;
    }
    .dataTables_length{
        margin-top: 10px;
    }
    .dataTable>tbody>tr>td{
        vertical-align: middle;
        font-size: 0.8em;
        padding: 8px 18px;
    }
    .dataTable>thead>tr>th{
        vertical-align: middle;
        font-size: 0.8em;
    }
</style>
<div class="tabs-panel">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<div class="box-header">
                    平台：
                    <select id="platform_2" name="platform" class="depart-input" style="width: 150px">&nbsp;
                        <option value="">请选择</option>
                        <option value="1">PC</option>
                        <option value="2">WAP</option>
                    </select>

                    <button type="button" class="btn btn-primary depart-modal" id="select_button" style="width: 100px;">查询</button> &nbsp;
                    <button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button>

				</div>
				<div class="box-body">
                    <button type="button" class="btn btn-success depart-modal" id="add_button" style="width: 100px;">添加</button>
					<table id="table_list" class="display">
						<thead>
							<tr>
								<th style="width: 5%">操作</th>
								<th style="width: 20%">品牌</th>
								<th style="width: 8%">SEO维护</th>
								<th style="width: 20%">图片名称</th>
								<th style="width: 10%">排序</th>
								<th style="width: 10%">图片</th>
								<th style="width: 10%">平台</th>
								<th style="width: 10%"><?=TITLE_STATUS?></th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="modal fade" id="BrandPicture-modal" style="background: rgba(236, 230, 230, 0.3);" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width: 70%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">品牌图片</h4>
            </div>
            <div class="modal-body">
                <form action="/brand-picture/change-brand-picture" method="post" name="BrandPicture_form" id="BrandPicture_form">
                    <div class="box-body">
                    	<div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>平台</label>
                            <select name="platform" id="platform" style="width: 25%;"  class="form-control">
                            	<option value="1">PC</option>
                            	<option value="2">WAP</option>
                            </select>
                        </div>
                     	<div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>品牌</label>
                            <select name="brand_id" id="brand_id" style="width: 25%;" class="form-control">
                            	<?php if (is_array($brand) && count($brand) > 0)foreach ($brand as $brand_val){?>
                            	<option value="<?=$brand_val['id']?>"><?=$brand_val['brand_name']?></option>
                            	<?php }?>
                            </select>
                        </div>
                    	<div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>图片名称</label>
                            <input style="width: 50%;" class="form-control" name="picture_name" placeholder="图片名称" id="picture_name"/>
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>排序</label>
                            <input style="width: 50%;" class="form-control" name="sort" placeholder="排序编号" id="sort"/>
                        </div>
                        <div class="form-group">
                        	<label for="tag_group_id_add">上传首页品牌街图片</label><br/>
                            <button type="button" class="btn btn-success depart-modal upload-img-btn" data-type="1" style="width: 100px;">上传图片</button>
                            <button onclick="showImg($(this).next().val())" type="button" class="btn btn-success depart-modal hide show-img-btn">查看图片</button>
                            <input type="hidden" value="" id="picture_url" name="picture_url" class="form-control">
                        </div>
                        <div class="form-group">
                        	<label for="tag_group_id_add">上传首页品牌街列表页图片</label><br/>
                            <button type="button" class="btn btn-success depart-modal upload-img-btn-1" data-type="1" style="width: 100px;">上传图片</button>
                            <button onclick="showImg($(this).next().val())" type="button" class="btn btn-success depart-modal hide show-img-btn-1">查看图片</button>
                            <input type="hidden" value="" id="brand_list_picture_url" name="brand_list_picture_url" class="form-control">
                        </div>
                        <div class="form-group">
                        	<label for="tag_group_id_add">上传首页品牌街列表页交互图片</label><br/>
                            <button type="button" class="btn btn-success depart-modal upload-img-btn-2" data-type="1" style="width: 100px;">上传图片</button>
                            <button onclick="showImg($(this).next().val())" type="button" class="btn btn-success depart-modal hide show-img-btn-2">查看图片</button>
                            <input type="hidden" value="" id="brand_interactive_picture_url" name="brand_interactive_picture_url" class="form-control">
                        </div>
                        <span style="font-size:16p;" class="remark">备注：上传首页品牌街图片、上传首页品牌街列表页图片为Jpg格式，上传首页品牌街列表页交互图片为Png格式，所有图片都不超过30k。</span>
                        <div class="form-group brand-category">
                    		<label for="tag_group_id_add">品牌街品牌分类</label>
                    	</div>
                        <div class="form-group">
                            <input value="" style="width:20px;height:20px;" name="is_show" id="is_show" type="checkbox">
            				<label style="padding-left: 30px"> 商城前台展示品牌街</label>
                        </div>
<!--                         <div class="form-group">
                            <label for="tag_group_id_add">图片alt</label>
                            <input style="width: 50%;" class="form-control" name="picture_alt" placeholder="图片名称" id="picture_alt"/>
                        </div> -->
                        <div class="form-group">
                            <label for="tag_group_id_add">点击链接</label>
                            <input style="width: 50%;" class="form-control" name="product_url" placeholder="点击链接" id="product_url"/>
                        </div>
                        <div class="form-group">
                            <label for="tag_group_id_add"><span class="text-danger">* </span>状态</label>
                            <select name="use_flg" id="use_flg" style="width: 25%;"  class="form-control">
                            	<option value="1">启用</option>
                            	<option value="0">禁用</option>
                            </select>
                        </div>
                    </div>
                    <input name="hot_sale_id" type="hidden" id="hot_sale_id">
                </form>
                <div style="display: none">
                    <?php $form = ActiveForm::begin(['id'=>'upload_form_update','action'=>'/common/img-upload'],['options' => ['enctype' => 'multipart/form-data']]) ?>
                    <?= $form->field($model, 'img_url')->fileInput(['class' => 'upload_file_ot']) ?>
                    <?php ActiveForm::end() ?>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <a type="button" class="btn btn-primary ajax_post_tag">提交</a>
            </div>
        </div>
    </div>
</div>
<input name="class_len" id="class_len" value="0" type="hidden"/>
<input id="img_class" value="upload-img-btn" type="hidden"/>
<?php include ('../views/seo/seo-modal.php');?>
<input type="hidden" name="imageBathUrl" id="imageBathUrl" value="<?php echo Yii::$app->params['imageBathUrl'] . '/' ?>">
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<script type="text/javascript" src="/static/plugins/treeTable/jquery.treetable.js"></script>
<!--图片上传插件用-->
<script type="text/javascript" src="/static/plugins/jquery.form.js"></script>
<!--图片显示用-->
<script type="text/javascript" src="../static/plugins/layer/layer.js"></script>
<!-- 搜索下拉框 -->
<script type="text/javascript" src="../static/app/goods-keyword/js/jquery.dropdown.js"></script>
<script type="text/javascript" src="../static/app/goods-keyword/js/mock.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript" src="/static/app/brand-picture/index.js?version=<?=Yii::$app->params['version']?>"></script>
<script>
var brand_category = <?=(is_array($brand_category) ? json_encode($brand_category) : '')?>;
</script>